#include <iostream>
using namespace std;

template <typename T1, typename T2>
class myPair{
    public:
        T1 key;
        T2 value;
        myPair(){}
        myPair(T1 k, T2 v):key(k), value(v){}
        ~myPair(){}
        void show();
};

template <typename T1, typename T2>
void myPair<T1, T2>::show(){
    cout << key << " : " << value << endl;
}

int main(int argc, const char *argv[]){
    myPair<string, double>node1("价格", 3.14);
    cout << "key : " << node1.key << " " << "value : " << node1.value << endl;
    node1.show();

    myPair<int, string>node2(1001, "张三");
    node2.show();

    myPair<string, string>node3("爱好", "游泳");
    node3.show();

    return 0;
}